package com.sunjs.base.controller;

import com.sunjs.base.service.UsersService;
import com.sunjs.model.Users;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author sunguoliang
 * @create 2018-09-25 下午2:12
 */
@RestController
@RequestMapping("/users")
public class UsersController {

    @Autowired
    private UsersService usersService;

    @RequestMapping(value = "/findAll", method = RequestMethod.GET)
    public List<Users> findAll(){
        return usersService.findAll();
    }

}